package com.cryptoneedle.garden.api;

import com.bubbles.engine.common.core.result.Result;
import com.cryptoneedle.garden.service.garden.mapping.MappingService;
import com.cryptoneedle.garden.vo.MappingTableCreateVo;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>description:  </p>
 *
 * @author CryptoNeedle
 * @date 2025-11-13
 */
@RestController
@RequestMapping("/garden/mapping")
public class MappingController {

    @Resource
    private MappingService mappingService;

    @PostMapping("/create")
    public Result<?> create(@Validated @RequestBody MappingTableCreateVo vo) {
        mappingService.createMappingTable(vo);
        return Result.success();
    }
}